TEMPLATE = lib

CONFIG += core gui x11 link_pkgconfig

QT += xml

TARGET = ccfdesigner

CHECKARCH = $$(ECLIPSEARCH)
linux*:isEmpty(CHECKARCH) {
    error("ECLIPSEARCH环境变量未设置，请设置为OSGI支持的架构，如x86、x86_64、aarch64、mipsel。");
}

linux* {
    DESTDIR = ../../ide.ccf.ccdesigner.linux.$$(ECLIPSEARCH)/lib
}
else:win32 {
    DESTDIR = ../../ide.ccf.ccdesigner.win32.x86/lib
} 

DEFINES += QT_NO_KEYWORDS
contains(CONFIG, static) {
    DEFINES += QT_DESIGNER_STATIC
    DEFINES += QT_NODLL
}

PKGCONFIG += gtk+-2.0 glib-2.0

INCLUDEPATH += $$(JAVADIR)/include \
    $$(JAVADIR)/include/linux \
    $$(QTDIR)/src/gui/kernel \
    $$QMAKE_INCDIR_QT/QtDesigner \
    $$PWD/QtCreator-3.4.0 \
    $$PWD/QtDesigner-4.8.6 \
    $$PWD
    
LIBS += -L/usr/lib \
    -lX11 \
    -lXt \
    -lgdk-x11-2.0 \
    -lgtk-x11-2.0

CONFIG(debug, debug|release) {
    linux* { 
        LIBS += -lQtDesigner$${QT_LIBINFIX} -lQtDesignerComponents$${QT_LIBINFIX} -lQtScript$${QT_LIBINFIX} 
    }
    else:win32 { 
        LIBS += -lQtDesignerd -lQtDesignerComponentsd -lQtScriptd 
    }
} 
else {
    LIBS += -lQtDesignerComponents$${QT_LIBINFIX} -lQtDesigner$${QT_LIBINFIX} -lQtScript$${QT_LIBINFIX}
}

HEADERS += ccfdesigner.h \
    designerbridgew.h \
    widgetboxw.h \
    propertyeditorw.h \
    objectinspectorw.h \
    formwindoww.h \
    actioneditorw.h \
    signalsloteditorw.h \
    resourceeditorw.h \
    formeditorw.h \
    eclipseintegration.h \
    QtCreator-3.4.0/formresizer.h \
    QtCreator-3.4.0/widgethost.h \
    QtCreator-3.4.0/sizehandlerect.h  \
    QtCreator-3.4.0/widgethostconstants.h
    

SOURCES += ccfdesigner.cpp \
    designerbridgew.cpp \
    widgetboxw.cpp \
    propertyeditorw.cpp \
    objectinspectorw.cpp \
    formwindoww.cpp \
    actioneditorw.cpp \
    signalsloteditorw.cpp \
    resourceeditorw.cpp \
    formeditorw.cpp \
    eclipseintegration.cpp \
    QtCreator-3.4.0/formresizer.cpp \
    QtCreator-3.4.0/widgethost.cpp \
    QtCreator-3.4.0/sizehandlerect.cpp \
